package com.firemoss.atonement.example.contactmanager.control.event
{
	import com.firemoss.atonement.example.contactmanager.model.Contact;
	
	import flash.events.Event;
	
	import mx.collections.ArrayCollection;
	
	public class ContactEvent extends Event
	{
		public static const OPEN_CONTACT_FOR_EDIT : String = "openContactForEdit";
		
		public static const SAVE_CONTACT : String = "saveContact"
		public static const SAVE_CONTACT_STARTED : String = "saveContactStarted"
		public static const SAVE_CONTACT_COMPLETE : String = "saveContactComplete"
		public static const SAVE_CONTACT_FAILED : String = "saveContactFailed"
			
		public static const GET_CONTACT : String = "getContact"
		public static const GET_CONTACT_STARTED : String = "getContactStarted"
		public static const GET_CONTACT_COMPLETE : String = "getContactComplete"
		public static const GET_CONTACT_FAILED : String = "getContactFailed"
			
		public static const LIST_CONTACTS : String = "listContacts"
		public static const LIST_CONTACTS_STARTED : String = "listContactsStarted"
		public static const LIST_CONTACTS_COMPLETE : String = "listContactsComplete"
		public static const LIST_CONTACTS_FAILED : String = "listContactsFailed"
			
		public var contact : Contact
		public var contacts : ArrayCollection
		
		public function ContactEvent(type:String, contact : Contact = null, contacts : ArrayCollection = null, bubbles:Boolean=true, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
			
			this.contact = contact
			this.contacts = contacts
		}
	}
}